# -*- coding=utf-8 -*-

##转自：https://www.zhihu.com/question/19948002

#作者：李医生
#链接：https://www.zhihu.com/question/19948002/answer/96644236
#来源：知乎
#著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。

#!/usr/bin/env python

groups = 5

values = [i for i in range(1,101)]
values.sort(reverse=True)

load_balance_groups = [[] for grp in range(groups)]

for v in values:
    load_balance_groups.sort(key=lambda x: sum(x))
    load_balance_groups[0].append(v)

for per in load_balance_groups:
    print(per)


